Bump libgit2 dep to hopefully fix win32
authorAlex Crichton <alex@alexcrichton.com>
Mon, 8 Dec 2014 17:04:19 +0000 (09:04 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 8 Dec 2014 19:14:09 +0000 (11:14 -0800)
Cargo.lock
src/cargo/sources/git/utils.rs
tests/test_cargo_build_auth.rs
tests/test_cargo_compile_git_deps.rs

index 44bb899fa2ffaf78614a5072ddf5f7dcdd36439d..b5ca27a388503d19a01761b87fd0d4507a031535 100644 (file)
@@ -61,7 +61,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 [[package]]
 name = "git2"
 version = "0.0.1"
-source = "git+https://github.com/alexcrichton/git2-rs#1676b0196c4b130ef670aa5c09903dd00aac33a6"
+source = "git+https://github.com/alexcrichton/git2-rs#a20191dde5d482debb90b5913f03a58ca73720e2"
 dependencies = [
  "libgit2-sys 0.0.1 (git+https://github.com/alexcrichton/git2-rs)",
  "time 0.1.0 (git+https://github.com/rust-lang/time)",
@@ -81,7 +81,7 @@ source = "git+https://github.com/carllerche/hamcrest-rust.git#2b9bd6cdae5dcf08ac
 [[package]]
 name = "libgit2-sys"
 version = "0.0.1"
-source = "git+https://github.com/alexcrichton/git2-rs#1676b0196c4b130ef670aa5c09903dd00aac33a6"
+source = "git+https://github.com/alexcrichton/git2-rs#a20191dde5d482debb90b5913f03a58ca73720e2"
 dependencies = [
  "libssh2-sys 0.0.1 (git+https://github.com/alexcrichton/ssh2-rs)",
  "openssl-sys 0.2.2 (git+https://github.com/sfackler/rust-openssl)",
index 0c85877dfc316c9a7cb550c66919c27ae8f425ca..38e23bc8af6c59a8d4f9ea714603da064f2db61a 100644 (file)
@@ -415,7 +415,7 @@ pub fn fetch(repo: &git2::Repository, url: &str,
         let mut remote = try!(repo.remote_anonymous(url.as_slice(), refspec));
         try!(remote.add_fetch("refs/tags/*:refs/tags/*"));
         remote.set_callbacks(&mut cb);
-        try!(remote.fetch(None, None));
+        try!(remote.fetch(&["refs/tags/*:refs/tags/*", refspec], None, None));
         Ok(())
     })
 }
index 177e17b1d3b03a5b2e7fe334acbbb987d9bb9486..f2a002f1ec404e67d1a6459cb1f252f3dfe5785e 100644 (file)
@@ -169,7 +169,7 @@ Caused by:
 ",
         addr = addr,
         errmsg = if cfg!(windows) {
-            "Failed to send request: The connection with the server \
+            "failed to send request: The connection with the server \
              was terminated abnormally\n"
         } else {
             "SSL error: [..]"
index 5797257737868d525f00e35e5b72fca0be2b65d3..af754adba0d07b45aa15b1dcab2437682fe9bc4b 100644 (file)
@@ -42,7 +42,7 @@ fn add(repo: &git2::Repository) {
     }
     let mut index = repo.index().unwrap();
     index.add_all(&["*"], git2::ADD_DEFAULT, Some(|a: &[u8], _b: &[u8]| {
-        if s.iter().any(|s| s.path().as_vec() == a) {1} else {0}
+        if s.iter().any(|s| a.starts_with(s.path().as_vec())) {1} else {0}
     })).unwrap();
     index.write().unwrap();
 }
@@ -53,7 +53,7 @@ fn add_submodule<'a>(repo: &'a git2::Repository, url: &str,
     let subrepo = s.open().unwrap();
     let mut origin = subrepo.find_remote("origin").unwrap();
     origin.add_fetch("refs/heads/*:refs/heads/*").unwrap();
-    origin.fetch(None, None).unwrap();
+    origin.fetch(&[], None, None).unwrap();
     origin.save().unwrap();
     subrepo.checkout_head(None).unwrap();
     s.add_finalize().unwrap();
@@ -979,7 +979,7 @@ test!(dep_with_changed_submodule {
         let mut origin = subrepo.find_remote("origin").unwrap();
         origin.set_url(git_project3.url().to_string().as_slice()).unwrap();
         origin.add_fetch("refs/heads/*:refs/heads/*").unwrap();;
-        origin.fetch(None, None).unwrap();
+        origin.fetch(&[], None, None).unwrap();
         origin.save().unwrap();
         let id = subrepo.refname_to_id("refs/remotes/origin/master").unwrap();
         let obj = subrepo.find_object(id, None).unwrap();